{extend name="public:base"/}


{block name="title"}编辑商品品牌{/block}
{block name="style"}
<link href="__STATIC__/admin/plugin/my_uploader/css/uploads.css" rel="stylesheet">
<style>
    #img-list2 .img-item{
        width:600px;
    }
</style>
{/block}

{block name="main"}

<section class="content" xmlns="http://www.w3.org/1999/html">
    <div class="row">

        <div class="col-md-12">

            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">店铺设置</h3>
                        </div>
                        <form  id="pt_form" method="post">
                            <div class="box-body">

                                <input type="hidden" name="shop_id" value="<?=$shop['shop_id']?>" ?>
                                <div class="clearfix"></div>

     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="name" class="control-label Validform_label" >店铺等级</label>
                                    </div>

                                    <div class='col-sm-10'>
                                        <div class=""><?=$shop['shop_type_name']?></div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>

                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="name" class="control-label Validform_label" >店铺名称</label>
                                    </div>

                                    <div class='col-sm-10'>
                                        <div class=""><?=$shop['shop_name']?></div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>

                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="name" class="control-label Validform_label" >店铺类型</label>
                                    </div>

                                    <div class='col-sm-10'>
                                        <div class=""><?=$shop['shop_group_name']?></div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="logo" class="control-label Validform_label" >店铺logo</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <div class="test">
                                            <div class="up-button" id="select-img">选择图片</div>
                                            <div class="img-list" id="img-list">
                                                <!--图片列表样例-->
                                                <div class="img-item">
                                                    <?=showImage($shop['shop_logo'],'100%','100%')?>
                                                    <input type="hidden" name="shop_logo" value="<?=$shop['shop_logo']?>"/>
                                                    <em class="delete" onclick="uploader.del_list(this)">×</em>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="logo" class="control-label Validform_label" >横幅</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <div class="test">
                                            <div class="up-button" id="select-img2">选择图片</div>
                                            <div class="img-list" id="img-list2">
                                                <!--图片列表样例-->
                                                <div class="img-item" style="width:600px;">
                                                    <?=showImage($shop['shop_banner'],'100%','100%')?>
                                                    <input type="hidden" name="shop_banner" value="<?=$shop['shop_banner']?>"/>
                                                    <em class="delete" onclick="uploader.del_list(this)">×</em>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="logo" class="control-label Validform_label" >店铺头像</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <div class="test">
                                            <div class="up-button" id="select-img3">选择图片</div>
                                            <div class="img-list" id="img-list3">
                                                <!--图片列表样例-->
                                                <div class="img-item">
                                                    <?=showImage($shop['shop_avatar'],'100%','100%')?>
                                                    <input type="hidden" name="shop_avatar" value="<?=$shop['shop_avatar']?>" />
                                                    <em class="delete" onclick="uploader.del_list(this)">×</em>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>
     
                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="shop_qq" class="control-label Validform_label" >QQ</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="shop_qq" class="form-control" name="shop_qq" placeholder="请输入QQ" value="<?=$shop['shop_qq']?>" datatype="*" ignore="ignore"  errormsg="QQ长度超出范围">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="shop_phone" class="control-label Validform_label" >商家电话</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="shop_phone" class="form-control" name="shop_phone" placeholder="请输入商家电话" value="<?=$shop['shop_phone']?>" datatype="n"  errormsg="商家电话格式不正确">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          


                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="shop_keywords" class="control-label Validform_label" >seo关键字</label>
                                    </div>
                                    <div class='col-sm-10'>

                                        <input id="desc" class="form-control" name="shop_keywords" placeholder="请输入seo关键字"   errormsg="seo关键字超出长度范围" value="<?=$shop['shop_keywords']?>">

                                        <div class="help-block"></div>
                                    </div>
                                </div>

                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="shop_description" class="control-label Validform_label" >seo描述</label>
                                    </div>
                                    <div class='col-sm-10'>

                                        <textarea id="shop_description" class="form-control" name="shop_description" placeholder="请输入seo描述" errormsg="seo描述超出长度范围" > <?=$shop['shop_description']?></textarea>
                                        <div class="help-block"></div>
                                    </div>
                                </div>

                            </div>
                            <div class="box-footer text-center">
                                <button class="btn btn-primary" type="submit">保存</button>
                                <span class="btn btn-white" onclick="history.go(-1)">返回</span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
{/block}

{block name="js"}
<script src="__STATIC__/admin/plugin/my_uploader/js/uploads.js"></script>

<script>
    var validate = validator('#pt_form','update');

    $('#select-img').click(function(){
        uploader.open({
            elm:'select-img',//选择图片上传的按钮
            url:"<?=url('common/AjaxController/uploader',['path'=>'shop/'.session('member_id')])?>",//服务器url
            up_type:1,//上传图片类型1:单图,2:多图
            img_list:'img-list',//存放选择图片之后的容器
            input_name:'shop_logo',//上传图片表单ID
            img_num:6,//多图上传的总数
            num:2
        });
    });

    $('#select-img2').click(function(){
        uploader.open({
            elm:'select-img2',//选择图片上传的按钮
            url:"<?=url('common/AjaxController/uploader',['path'=>'shop/'.session('member_id')])?>",//服务器url
            up_type:1,//上传图片类型1:单图,2:多图
            img_list:'img-list2',//存放选择图片之后的容器
            input_name:'shop_banner',//上传图片表单ID
            img_num:6,//多图上传的总数
            num:2
        });
    });

    $('#select-img3').click(function(){
        uploader.open({
            elm:'select-img3',//选择图片上传的按钮
            url:"<?=url('common/AjaxController/uploader',['path'=>'shop/'.session('member_id')])?>",//服务器url
            up_type:1,//上传图片类型1:单图,2:多图
            img_list:'img-list3',//存放选择图片之后的容器
            input_name:'shop_avatar',//上传图片表单ID
            img_num:6,//多图上传的总数
            num:2
        });
    });

</script>
{/block}